<?php
class AddController{
    public function doadd(){
        $a=Factory::getClass('AddModel');
        $str='';
        $str2='';
        $post=$_POST;
        //var_dump($post);
        foreach($post as $k=>$v){ 
            if($k!='id'&&$k!='colId'&&$k!='table'){
                $str.="$k,";
                $str2.="'{$v}',";
            }
        }
        //var_dump($str);
        //var_dump($str2);
        $a->add($str,$str2);
        echo '<script>window.location.href="index.php"</script>';
    }
}




?>